#include <stdio.h>
#include "OLED.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"

void app_main() {
    ESP_LOGI("main","Init");
    OLED_Init(); // 初始化OLED

    ESP_LOGI("main","显示字符串");
    // 显示字符串
    OLED_ShowString(0, 0, "OLED, Driver!", OLED_8X16);

    ESP_LOGI("main","显示数字");
    // 显示数字
    OLED_ShowNum(0, 16, 12345, 5, OLED_8X16);

    ESP_LOGI("main","显示浮点数");
    // 显示浮点数
    OLED_ShowFloatNum(0, 32, 3.14159, 4, 4, OLED_8X16);

    ESP_LOGI("main","显示汉字");
    // 显示汉字
    OLED_ShowChinese(0, 48, "你好世界");

    ESP_LOGI("main","绘制图形");
    // 绘制图形
    OLED_DrawRectangle(0, 64, 32, 16, OLED_FILLED);
    OLED_DrawCircle(64, 64, 16, OLED_FILLED);
    OLED_DrawEllipse(96, 64, 16, 8, OLED_FILLED);
    
    ESP_LOGI("main","更新显示");
    OLED_Update(); // 更新显示
}